package com.stone.framework.batch.entity;

import java.time.LocalDate;
import java.time.LocalDateTime;

import javax.persistence.Column;
import javax.persistence.Entity;

import com.stone.framework.core.entity.DebtEntity;

/**
 * 案件状态相关
 * 
 * @author whocares
 * @date 2020/04/11
 */
@Entity(name = "ST_CASE_STATE")
public class CaseState extends DebtEntity {

    private static final long serialVersionUID = -1827017199412391725L;

    @Column(name = "CASE_NBR")
    private String caseNbr;

    @Column(name = "CUST_NBR")
    private String custNbr;

    @Column(name = "CUST_NAME")
    private String custName;

    /**
     * 委案日期
     */
    @Column(name = "START_DATE")
    private LocalDate startDate;

    /**
     * 结案日期
     */
    @Column(name = "END_DATE")
    private LocalDate endDate;

    @Column(name = "state")
    private CaseState.State state;

    @Column(name = "LAST_ENTRY_DATE")
    private LocalDateTime lastEntryDate;

    @Column(name = "LAST_EXIT_DATE")
    private LocalDateTime lastExitDate;

    @Column(name = "LAST_FOLLOWUP_DATE")
    private LocalDateTime lastFollowupDate;

    public static enum State {
        UNALLOC("未分配"), ALLOC("已分配"), QUIT("退案"), CANCEL("撤案"), END("结案");

        private String desc;

        private State(String desc) {
            this.desc = desc;
        }

        public String getDesc() {
            return desc;
        }
    }

    public String getCaseNbr() {
        return caseNbr;
    }

    public void setCaseNbr(String caseNbr) {
        this.caseNbr = caseNbr;
    }

    public String getCustNbr() {
        return custNbr;
    }

    public void setCustNbr(String custNbr) {
        this.custNbr = custNbr;
    }

    public String getCustName() {
        return custName;
    }

    public void setCustName(String custName) {
        this.custName = custName;
    }

    public LocalDate getStartDate() {
        return startDate;
    }

    public void setStartDate(LocalDate startDate) {
        this.startDate = startDate;
    }

    public LocalDate getEndDate() {
        return endDate;
    }

    public void setEndDate(LocalDate endDate) {
        this.endDate = endDate;
    }

    public CaseState.State getState() {
        return state;
    }

    public void setState(CaseState.State state) {
        this.state = state;
    }

    public LocalDateTime getLastEntryDate() {
        return lastEntryDate;
    }

    public void setLastEntryDate(LocalDateTime lastEntryDate) {
        this.lastEntryDate = lastEntryDate;
    }

    public LocalDateTime getLastExitDate() {
        return lastExitDate;
    }

    public void setLastExitDate(LocalDateTime lastExitDate) {
        this.lastExitDate = lastExitDate;
    }

    public LocalDateTime getLastFollowupDate() {
        return lastFollowupDate;
    }

    public void setLastFollowupDate(LocalDateTime lastFollowupDate) {
        this.lastFollowupDate = lastFollowupDate;
    }

}
